package a.j;

import a.e.c;

import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class zb
  extends tb
{
  private static final int H = 12;
  public static boolean I;
  
  public zb() {}
  
  public zb(tb paramtb)
  {
    super(paramtb);
  }
  
  public tb b(tb paramtb)
  {
    return new zb(paramtb);
  }
  
  public eb a(double paramDouble1, double paramDouble2, eb parameb, int paramInt)
  {
    eb localeb = new eb(this, paramDouble1, paramDouble2);
    a(localeb, parameb, paramInt);
    return localeb;
  }
  
  public void a(eb parameb1, eb parameb2, int paramInt)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramInt == 0)
      {
        this.D.b(parameb1, this.D.d(parameb2));
        if (bool) {
          return;
        }
      }
    }
    else {
      if (!ld.D) {
        break label59;
      }
    }
    this.D.a(parameb1, this.D.d(parameb2));
    label59:
    Q();
  }
  
  public eb b(double paramDouble1, double paramDouble2)
  {
    int i = e(paramDouble1, paramDouble2);
    if (i > 0) {
      return a(paramDouble1, paramDouble2, (eb)this.D.a(i - 1), 1);
    }
    return null;
  }
  
  public eb a(eb parameb)
  {
    this.D.remove(parameb);
    Q();
    return parameb;
  }
  
  protected byte a(Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (n() == 0) {
        return ye.a(this, this.E, paramPoint2D1, paramPoint2D2);
      }
    }
    int i = n() + 2;
    int[] arrayOfInt1 = new int[i];
    int[] arrayOfInt2 = new int[i];
    ld localld1 = h();
    ld localld2 = g();
    zd localzd1 = k();
    zd localzd2 = l();
    int j = 0;
    arrayOfInt1[j] = ((int)localzd1.a(localld1));
    arrayOfInt2[j] = ((int)localzd1.b(localld1));
    j++;
    Object localObject1 = o();
    do
    {
      if (!((fb)localObject1).e()) {
        break;
      }
      localObject2 = ((fb)localObject1).a();
      arrayOfInt1[j] = ((int)((eb)localObject2).b());
      arrayOfInt2[j] = ((int)((eb)localObject2).c());
      ((fb)localObject1).f();
      j++;
      if ((!bool2) && (bool1)) {
        break label209;
      }
    } while (!bool1);
    arrayOfInt1[j] = ((int)localzd2.a(localld2));
    if (!bool2) {
      arrayOfInt2[j] = ((int)localzd2.b(localld2));
    }
    label209:
    localObject1 = a(i - 1, arrayOfInt1);
    Object localObject2 = a(i - 1, arrayOfInt2);
    this.E.reset();
    this.E.moveTo(localObject1[0].a(0.0F), localObject2[0].a(0.0F));
    j = 0;
    label348:
    label350:
    do
    {
      if (j >= localObject1.length) {
        break;
      }
      if (bool1) {
        break label382;
      }
      int k = 1;
      do
      {
        if (k > 12) {
          break;
        }
        float f = k / 12.0F;
        this.E.lineTo(localObject1[j].a(f), localObject2[j].a(f));
        k++;
        if (bool2) {
          break label350;
        }
        if (bool1) {
          break label348;
        }
      } while (!bool1);
      if (!bool2) {
        j++;
      }
    } while (!bool1);
    label382:
    return ye.a(this, this.E, this.E = new GeneralPath(1, n() + 4), paramPoint2D1, paramPoint2D2);
  }
  
  public int e(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (n() == 0) {
        return super.e(paramDouble1, paramDouble2);
      }
    }
    int i = 1;
    if (!bool2) {
      if (R()) {
        v();
      }
    }
    fb localfb = o();
    double d1 = localfb.a().b();
    double d2 = localfb.a().c();
    PathIterator localPathIterator = this.E.getPathIterator(null);
    if ((bool2) || (localPathIterator.isDone())) {
      return 0;
    }
    float[] arrayOfFloat = hb.a().c;
    localPathIterator.currentSegment(arrayOfFloat);
    localPathIterator.next();
    float f1 = arrayOfFloat[0];
    float f2 = arrayOfFloat[1];
    if (!localPathIterator.isDone()) {
      localPathIterator.currentSegment(arrayOfFloat);
    }
    label318:
    while (bool2)
    {
      if (bool1) {
        break label327;
      }
      if (Line2D.ptSegDist(f1, f2, arrayOfFloat[0], arrayOfFloat[1], paramDouble1, paramDouble2) < 5.0D) {
        return i;
      }
      if (!bool2)
      {
        if (Line2D.ptSegDist(f1, f2, arrayOfFloat[0], arrayOfFloat[1], d1, d2) < 5.0D)
        {
          if (bool2) {
            break label318;
          }
          if (localfb.e())
          {
            i++;
            localfb.f();
            if (bool2) {
              break label318;
            }
            if (localfb.e())
            {
              d1 = localfb.a().b();
              d2 = localfb.a().c();
            }
          }
        }
        localPathIterator.next();
        f1 = arrayOfFloat[0];
        f2 = arrayOfFloat[1];
      }
      if (!bool1) {
        break;
      }
    }
    label327:
    return 0;
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeByte(0);
    super.a(paramObjectOutputStream);
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    if (!ld.E) {}
    switch (paramObjectInputStream.readByte())
    {
    case 0: 
      super.a(paramObjectInputStream);
      if (!ld.D) {
        break;
      }
    default: 
      throw new c();
    }
  }
  
  private a_[] a(int paramInt, int[] paramArrayOfInt)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    float[] arrayOfFloat1 = new float[paramInt + 1];
    float[] arrayOfFloat2 = new float[paramInt + 1];
    float[] arrayOfFloat3 = new float[paramInt + 1];
    arrayOfFloat1[0] = 0.5F;
    int i = 1;
    if (i < paramInt) {}
    do
    {
      arrayOfFloat1[i] = (1.0F / (4.0F - arrayOfFloat1[(i - 1)]));
      i++;
      if (bool2) {
        break label113;
      }
      if (bool1) {
        break label112;
      }
      if (!bool1) {
        break;
      }
      arrayOfFloat1[paramInt] = (1.0F / (2.0F - arrayOfFloat1[(paramInt - 1)]));
    } while (bool2);
    arrayOfFloat2[0] = (3 * (paramArrayOfInt[1] - paramArrayOfInt[0]) * arrayOfFloat1[0]);
    label112:
    label113:
    i = 1;
    if (i < paramInt) {}
    do
    {
      arrayOfFloat2[i] = ((3 * (paramArrayOfInt[(i + 1)] - paramArrayOfInt[(i - 1)]) - arrayOfFloat2[(i - 1)]) * arrayOfFloat1[i]);
      i++;
      if (bool2) {
        break label216;
      }
      if (bool1) {
        break label213;
      }
      if (!bool1) {
        break;
      }
      arrayOfFloat2[paramInt] = ((3 * (paramArrayOfInt[paramInt] - paramArrayOfInt[(paramInt - 1)]) - arrayOfFloat2[(paramInt - 1)]) * arrayOfFloat1[paramInt]);
    } while (bool2);
    arrayOfFloat3[paramInt] = arrayOfFloat2[paramInt];
    label213:
    label216:
    i = paramInt - 1;
    a_[] arrayOfa_;
    do
    {
      do
      {
        if (i < 0) {
          break;
        }
        arrayOfFloat2[i] -= arrayOfFloat1[i] * arrayOfFloat3[(i + 1)];
        i--;
      } while (!bool1);
      arrayOfa_ = new a_[paramInt];
    } while (bool2);
    i = 0;
    do
    {
      while (!bool1)
      {
        if (i >= paramInt) {
          break;
        }
        if ((!bool2) && (bool1)) {
          break label379;
        }
        arrayOfa_[i] = new a_(paramArrayOfInt[i], arrayOfFloat3[i], 3 * (paramArrayOfInt[(i + 1)] - paramArrayOfInt[i]) - 2.0F * arrayOfFloat3[i] - arrayOfFloat3[(i + 1)], 2 * (paramArrayOfInt[i] - paramArrayOfInt[(i + 1)]) + arrayOfFloat3[i] + arrayOfFloat3[(i + 1)]);
        i++;
      }
    } while (bool2);
    label379:
    return arrayOfa_;
  }
  
  private static final class a_
  {
    float a;
    float c;
    float d;
    float e;
    
    public a_(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
    {
      this.a = paramFloat1;
      this.c = paramFloat2;
      this.d = paramFloat3;
      this.e = paramFloat4;
    }
    
    public float a(float paramFloat)
    {
      return ((this.e * paramFloat + this.d) * paramFloat + this.c) * paramFloat + this.a;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.zb

 * JD-Core Version:    0.7.0.1

 */